-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor: project structure #12
base: develop
Are you sure you want to change the base?
Conversation
😮 edit: praise: great work Cyril! To address your question: I don't think the testing - especially in it's current form with imaging plaza specific failing shapes and inferencing. To test a SHACL api we should be able to use something more generic, but honestly - I'm not sure whether it's our responsibility to test the SHACL api using shapes. Then we are not testing the API, but the engine - which is not our concern. So I agree - let's drop these tests. Also, I really appreciate the increased genericness and use of env variable to point to a shapes URL. Maybe we could even promote this API on the TopQuadrant repo to get further feedback + contributions from the community. |
Thank you a lot @cmdoret! This looks great. I'll add my review during this week. @rmfranken could you try this component with Plaza in local? Regarding tests, those are pretty old and originally used for testing the scripts more than the microservice. No problem on dropping those. |
Change summary
Project layout
General cleanup to match best practice recommendations on project structure:
bench
moved underexamples/{data,notebooks}
tools
tools/docker
src
layout withpyproject.toml
, following https://packaging.python.org conventionsReusability
SHAPES_URL
variable can be given to download the shapes on container startup.example.env
file for centralized overview of env variablesModularity
The REST API and web application have been separated more clearly. This provides a smaller image with potentially fewer vulnerabilities for headless use-cases.
pyproject.toml
pip install .
pip install '.[webapp]'
api
stage followed by awebapp
stage.image:version
) and one with the api + webapp (<image>:<version>-webapp
)Development tools
Adds minimal tooling for development:
Usage
Just type
make
to see what operations are available with help messages. The rest should be straight forward.Notes
ruff format
to ensure standardized formatting across source files.apk
, making it impossible (afaik) to use a venv separated from the system.Questions